package onetotwenty;

import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;

import org.junit.Test;

public class ProblemSix {
	private int sumPower(int n) {
		int item = 0;
		for (int i = 1; i <= n; i++) {
			item += (i * i);
		}

		return item;
	}

	@Test
	public void test10() {
		assertThat((55 * 55) - sumPower(10), is(2640));
	}
	
	@Test
	public void test100() {
		assertThat((5050 * 5050) - sumPower(100), is(25164150));
	}
}
